#ifndef TERMINALWIDGET_H
#define TERMINALWIDGET_H

#include <QWidget>
#include "ui_terminalwidget.h"
#include "ui_serialportconfiguration.h"
#include "configdialog.h"

class TerminalWidget : public QWidget
{
	Q_OBJECT

public:
	TerminalWidget(QWidget *parent = 0);
	~TerminalWidget();

private:
	Ui::TerminalWidget ui;
	ConfigDialog* dialog;
	QextSerialPort* serialPort;
	QTextCodec* codec;

private:
	void loadSettings();

private slots:
	void slotConnectPort();
	void slotDisconnectPort();
	void slotSendCommand();
	void slotOpenConfigDialog();
	void slotOnCloseConfigDialog();
	void slotOnReadyRead();

};

#endif // TERMINALWIDGET_H
